# Contributor: Alan Lacerda <alacerda@alpinelinux.org>
# Maintainer: Alan Lacerda <alacerda@alpinelinux.org>
pkgname=setup-box
pkgver=1.0.1
pkgrel=2
pkgdesc="A tool to setup a variety of Alpine Linux Environments"
url="https://git-old.alpinelinux.org/user/alacerda/setup-box/"
arch="noarch"
license="MIT"
depends="jq"
subpackages="$pkgname-doc"
source="https://dev.alpinelinux.org/archive/setup-box/setup-box-$pkgver.tar.bz2"
options="!check"

build() {
	sed -i \
		-e 's:@CONFIG_DIR@:/etc/setup-box:g' \
		-e 's:@JSON_DIR@:/etc/setup-box/json:g' \
		-e 's:@VERSION@:v$pkgver:g' \
		setup-box
}

package() {
	install -Dm755 setup-box -t "$pkgdir"/sbin
	install -Dm644 json/* -t "$pkgdir"/etc/setup-box/json
	install -Dm644 usr/share/man/setup-box.1.gz -t "$pkgdir"/usr/share/man/man1
}

sha512sums="22891037b4a0ed8a60103959e21b2d99e4bdf0a518419141623373b6a7a1c0160c8bd761ca81637bef069078849d06952817eaef83fd5c426ae9693329c29e48  setup-box-1.0.1.tar.bz2"
